feat(json-renderer): share the field descriptor and widget rule pipeline - #35
Conversation
…pipeline Raise flow-to-blocks off the broken @fbp/evaluator@1.3.0 floor and move the field -> node rule pipeline into json-renderer so every document source shares it.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review complete. No issues found — approved ✅. This PR consolidates schema-to-UI lowering logic:
Reviewed commit: 5170812 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
Two things, both prerequisites for the rest of phase 2 of constructive-io/constructive-planning#1822.
1.
@fbp/evaluatorfloor.flow-to-blocksallowed^1.3.0, and 1.3.0 is permanently uninstallable (it shipped"@fbp/types": "workspace:*"). Floor raised to^1.5.0, which also lets the temporary workarounds go: the"@fbp/evaluator>@fbp/types"override inpnpm-workspace.yamland the matching override in the packed-consumer check.2.
form-resolver-core. The field → node rule pipeline lived insidejson-schema-to-blocks, someta-to-blocks(and later HITL task forms / function inputs) would each fork their own copy of decisions like "format: urirenders as a file picker". It now lives injson-renderer/rulesas a source-neutral layer — still no React, no@constructive-io/*, and no Constructive widget names in the generic package:json-schema-to-blockskeeps every one of its exported names and now specializes rather than duplicates:So a rule matches on
ctx.dataType/ctx.format/ctx.enumValues/ctx.constraintswhen the decision is source-neutral (those rules will work verbatim against a_metacolumn), and still reaches intoctx.schemafor genuinely schema-specific keywords likemultipleOf.ctx.uistays as an alias ofctx.hints, so existing app rules keep compiling.No behavior change intended: the 23 existing conversion tests pass untouched (
x-ui, required/disabled/readOnly, defaults andconst, constraints, enums, recursion, variants, ordering,$refcycles), plus 14 new tests for the generic helpers.Verification
pnpm build,pnpm lint:types,pnpm test,pnpm check,pnpm pack:checkall green under Node 24 / pnpm 10.28.0 (installed directly, not through corepack — a corepack shim resolvespnpmper-directory, sopack:check's throwaway consumers outside the workspace got pnpm 11 and failed onERR_PNPM_IGNORED_BUILDS: esbuild). CI installs pnpm viapnpm/action-setup, so it is unaffected.Link to Devin session: https://app.devin.ai/sessions/027937d092794c92a31c6ee49c513f59
Requested by: @pyramation